home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c++-part2 / 18504 < prev    next >
Encoding:
Internet Message Format  |  1996-08-05  |  973 b 

  1. From: ChrisHines@msn.com (Chris Hines)
  2. Subject: Re: sizeof() question >>> :)
  3. Date: 21 Apr 96 02:25:35 -0700
  4. References: <1996Apr12.061927@topaz> <31714828.1574068@news.linex.com> <4l0dcr$14t0@darwin.nbnet.nb.ca> <danpop.829678939@news.cern.ch> <4l4fik$1a8_005@donstarr.best.com> <4l5pqj$c8m@news.halcyon.com>
  5. Message-ID: <00001a81+0000b278@msn.com>
  6. Path: news.msn.com!msn.com
  7. Newsgroups: comp.lang.c++
  8. Organization: The Microsoft Network (msn.com)
  9.  
  10. >I think the wisest advise is to track the size yourself when you
  11. >allocate, pass array dims yourself to functions, etc.
  12. >                    --Norm 
  13.  
  14. That's probably the best advice given so far on this topic.  Either 
  15. store the size of the array somewhere (preferably encapsulated in an 
  16. object that represents the array), or put a sentinel value at the end 
  17. of the array so that your code can be made to stop before it over 
  18. runs the array.
  19.  
  20. ------
  21. ChrisHines@msn.com
  22. The sooner you start coding, the longer it will take you to finish.
  23.